﻿#ifndef ASSEMBLEFLOW_H
#define ASSEMBLEFLOW_H

#include "common/baseeditor.h"
#include "af_additem.h"

namespace Ui {
class AssembleFlow;
}

class AssembleFlow : public BaseEditor
{
    Q_OBJECT

public:
    explicit AssembleFlow(QWidget *parent = nullptr);
    ~AssembleFlow();

    void generateMenu();
    void updateView();
    void updateMonth();
    void updateDate();
    void updatePartners();
    void newItem();
    void removeItem();
    void copyNewItem();
    void generateSummary();

protected:
    void keyPressEvent(QKeyEvent *event);

private slots:
    void on_month_currentTextChanged(const QString &text);
    void on_listView_doubleClicked(const QModelIndex &index);
    void on_kw_returnPressed();
    void on_partner_currentTextChanged(const QString &text);

private:
    Ui::AssembleFlow *ui;

    QString selectMonth;
    QString selectDate;

    int selectId;
    QStringListModel *listModel;
};

#endif // ASSEMBLEFLOW_H
